#http://demo.2799.cn/1294375486/
set :deploy_to, "/home/wangzhen/www/01.jadejade.cn"
role :app, "173.255.253.214"
role :web, "173.255.253.214"
role :db,  "173.255.253.214", :primary => true
default_run_options[:pty] = true


namespace :deploy do
  desc <<-DESC
  Restart the application altering tmp/restart.txt for mod_rails.
  DESC
  task :restart, :roles => :app do
    run "cp /home/wangzhen/www/01.jadejade.cn/shared/database.yml /home/wangzhen/www/01.jadejade.cn/current/config/."
    run "touch  #{File.join(deploy_to, current_dir)}/tmp/restart.txt"
#    run "ln -s /root/www/01.jadejade.cn/shared/system /root/www/01.jadejade.cn/current/public/system"
    #    run " rm -rf #{release_path}/tmp"
  end
end

#namespace :deploy do
#  %w(start restart).each { |name| task name, :roles => :app do mod_rails.restart end }
#  %w(start restart).each { |name| task name, :roles => :app do mod_rails.restart end }
#end

